# Adapted from rfacebook
desc "Reverse tunnel to for developing on localhost. Uses env variables REMOTE_PORT, REMOTE_USER, REMOTE_HOST, LOCAL_PORT"
namespace "oauth4r" do
  task "tunnel" do
    exec "ssh -nNT -g -R *:#{ENV['REMOTE_PORT']}:0.0.0.0:#{ENV['LOCAL_PORT']} #{ENV['REMOTE_USER']}@#{ENV['REMOTE_HOST']}"
  end
end
#
